package com.globallogic.dailyplanner.dto;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;



@Entity
@Table(name = "history")
public class History implements Serializable{
	private static final long serialVersionUID = -3340251552706538520L;

	@Id
	@GeneratedValue
	private int id;
	
	@ManyToOne(optional=false)
	private Mail mail;
	
	@ManyToOne(optional=false)
	private User user;
	
	@Column(nullable = false)
	@Enumerated(EnumType.STRING)
	private MailStatusEnum status;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Mail getMail() {
		return mail;
	}
	public void setMail(Mail mail) {
		this.mail = mail;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public MailStatusEnum getStatus() {
		return status;
	}
	public void setStatus(MailStatusEnum status) {
		this.status = status;
	}
	
}
